/*
 =============================================================================
 FILE...............: DatabaseService.java
 COMMENTS...........: Represents a database service.
 =============================================================================
 AUTHOR(S)..........: Everton Ranielly de Sousa Cavalcante
 					  Department of Informatics and Applied Mathematics
 					  Federal University of Rio Grande do Norte
 LAST MODIFICATION..: November 26th, 2012
 ============================================================================= 					  
*/


/* ========================================================================= */
/* PACKAGES							                                         */
/* ------------------------------------------------------------------------- */
package services;


/* ========================================================================= */
/* IMPORTS							                                         */
/* ------------------------------------------------------------------------- */
import java.util.ArrayList;
import java.util.List;


import model.Booking;
import model.Flight;
import model.Receipt;


/* ========================================================================= */
/* CLASS DatabaseService			                                         */
/* ------------------------------------------------------------------------- */
/**
 * Represents a database service
 * @author Everton Cavalcante
 */
public interface DatabaseService 
{
	/**
	 * Searches for available flights considering the user specified criteria
	 * @param from Departure airport
	 * @param to Arrival airport
	 * @param departureDate Departure date
	 * @param arrivalDate Departure time
	 * @return Available flights
	 */
	public Flight[] searchFlights(String from, String to, String departureDate, String arrivalDate);
	
	/**
	 * Updates database by inserting the generated booking and receipt
	 * @param booking Generated booking
	 * @param receipt Generated receipt
	 * @return A boolean flag that confirms if the operation was successfully
	 * 		   performed (<code>true</code>) or not (<code>false</code>)
	 */
	public boolean updateInformation(Booking booking, Receipt receipt); 
}